// 这是一个嵌套路由规则文件

// 项目路由文件
import { lazy, Suspense } from "react";
import { Route, Switch } from "react-router-dom";
// 导入loading组件
import Loading from "@/components/Loading";

// lazy导入需要渲染的组件
const UserList = lazy(() => import("@/views/dashboard/users/Index"));
// ....

const Routes = () => {
    return (
        <Suspense fallback={<Loading />}>
            <Switch>
                <Route path="/dashboard/users" component={UserList} />
            </Switch>
        </Suspense>
    );
};

// 导出
export default Routes;
